import pytest
from lib.log import Loggers
from lib.ui import Driver
from utils.Home_baidu import Baidu


@pytest.fixture(scope='function')
def stepInfo():
    return Loggers(name="TestCase")


@pytest.fixture(scope='class')
def chrome_driver(request):
    driver = Driver(browser="CHROME")
    request.cls.driver = driver.driver
    yield
    driver.driver.close()

@pytest.fixture(scope="class")
def baidu_page(request):
    driver = Driver(browser="CHROME")
    request.cls.page = Baidu(driver=driver.driver)